Security News
vlt Debuts New JavaScript Package Manager and Serverless Registry at NodeConf EU
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
@stitches/core
Advanced tools
@stitches/core is a CSS-in-JS library that provides a performant, flexible, and feature-rich way to style your applications. It allows you to write CSS with JavaScript, offering features like theming, responsive design, and utility-first styling.
Styling Components
This feature allows you to create styled components using the `styled` function. You can define styles directly in your JavaScript code and apply them to HTML elements.
const { styled } = require('@stitches/core');
const Button = styled('button', {
backgroundColor: 'blue',
color: 'white',
padding: '10px 20px',
borderRadius: '5px',
'&:hover': {
backgroundColor: 'darkblue'
}
});
Theming
Theming allows you to define different themes for your application. You can create multiple themes and switch between them dynamically.
const { createTheme } = require('@stitches/core');
const darkTheme = createTheme({
colors: {
background: 'black',
text: 'white'
}
});
const lightTheme = createTheme({
colors: {
background: 'white',
text: 'black'
}
});
Responsive Design
This feature allows you to define responsive styles using media queries. You can specify different styles for different screen sizes.
const { styled } = require('@stitches/core');
const Container = styled('div', {
width: '100%',
'@media (min-width: 768px)': {
width: '50%'
}
});
Utility-First Styling
Utility-first styling allows you to create utility classes that can be reused across your application. This promotes consistency and reduces the amount of CSS you need to write.
const { css } = require('@stitches/core');
const utilityClass = css({
margin: '10px',
padding: '20px',
backgroundColor: 'lightgray'
});
styled-components is another popular CSS-in-JS library that allows you to write actual CSS to style your components. It offers similar features like theming and dynamic styling but uses tagged template literals for defining styles.
Emotion is a performant and flexible CSS-in-JS library. It provides both a styled API and a css API, giving you the flexibility to choose how you want to style your components. It also supports theming and server-side rendering.
Linaria is a zero-runtime CSS-in-JS library. It allows you to write CSS in your JavaScript files but extracts the CSS at build time, resulting in no runtime overhead. It supports theming and dynamic styling.
Framework-agnostic implementation.
npm install @stitches/core
For full documentation, visit stitches.dev.
Please follow our contributing guidelines.
Licensed under the MIT License, Copyright © 2021-present Modulz.
See LICENSE for more information.
FAQs
The modern CSS-in-JS library
We found that @stitches/core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Security News
Research
The Socket Research Team uncovered a malicious Python package typosquatting the popular 'fabric' SSH library, silently exfiltrating AWS credentials from unsuspecting developers.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.